package com.wavehi.web;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * @Author WaveHi
 * @Date 16/9/2021 下午 6:35
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description First homework: Demonstrate the rules of mapping.
 */
public class FirstHomework01Servlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("I am firstHomework01Servlet!");
        resp.setContentType("UTF-8");
        //获取输出流
        PrintWriter writer = resp.getWriter();
        //输出数据
        writer.write("I am firstHomework01Servlet!");
    }
}
